export interface EquipmentTypeGroup {
  equipmentParamGroupsCode: string;
  equipmentParamGroupsId: string;
  equipmentParamGroupsName: string;
  remark: string;
  parentId: string;
  tenantId: string;
  children: Array<EquipmentTypeGroup>;
}
export interface EquipmentAttrItem {
  attributeDesc: string;
  attributeId: string;
  attributeName: string;
  dataType: string;
  displayOrder: number;
  equipmentTypeAttributeId: string;
  defaultEquipmentTypeAttributeId: string;
  equipmentTypeId: string;
  extend: any;
  functionType: string;
  groupCode: string;
  rate: number;
  readWriteType: string;
  tenantId: string;
  unit: string;
  valueRange: string;
  stepSize: string;
  max: number | string;
  min: number | string;
  value1: string;
  value2: string;
  eventType: string;
  keyAttribute: boolean;
  equipmentParamGroupsId: string;
  attributeDisplayName: string;
  attributeLevel: string;
  display: boolean | string;
  key: string;
  [key: string]: any;
}
export type ParEquipmentTypeGroup = Partial<EquipmentTypeGroup>;
export type ParEquipmentAttrItem = Partial<EquipmentAttrItem>;

export const ReadWriteType = {
  R: "只读",
  RW: "读写",
};
export const EventType = {
  alarm: "故障报警",
  info: "信息",
};
export const FunctionType = {
  property: "属性",
  event: "事件",
};
export const AttributeLevel = {
  import: "重要",
  minor: "次要",
  general: "一般",
};
export const DataType = {
  boolean: "布尔类型",
  float: "浮点类型",
  string: "字符类型",
  int: "整型类型",
};
export interface GroupOptions {
  equipmentParamGroupsId: string;
  groupCode: string;
  equipmentTypeId: string;
}

export interface AttrViewReq {
  equipmentTypeAttributeIds: string[];
  operationView?: boolean;
  userView?: boolean;
}
